<template>
    <div>
        <VEcharts :options="options" @click="chartClick" />
    </div>
</template>

<script>
export default {
    data() {
        var options = {
            legend: {
                // Try 'horizontal'
                orient: "vertical",
                right: 10,
                top: "center",
            },
            dataset: {
                source: [
                    ["product", "2015", "2016", "2017"],
                    ["Matcha Latte", 43.3, 85.8, 93.7],
                    ["Milk Tea", 83.1, 73.4, 55.1],
                    ["Cheese Cocoa", 86.4, 65.2, 82.5],
                    ["Walnut Brownie", 72.4, 53.9, 39.1],
                ],
            },
            xAxis: { type: "category" },
            yAxis: {},
            series: [{ type: "bar" }, { type: "bar" }, { type: "bar" }],
        };
        return {
            options,
        };

    },
    methods: {
        chartClick(params) {
            console.log('ppp', params);
        }
    }
};
</script>

<style></style>
